/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe4f0 50%, #ffd9e8 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 40px;
    position: relative;
    overflow-x: hidden;
}

/* ===== 블러 배경 이미지 (z-index: -2) ===== */
.background-div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://images.unsplash.com/photo-1522383225653-ed111181a951?w=1920&q=80");
    background-size: cover;
    background-position: center;
    filter: blur(1.5px);
    z-index: -2;
}

/* ===== 벚꽃 배경 (z-index: -1) ===== */
.cherry-blossom-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255, 182, 193, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 80%, rgba(255, 192, 203, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 218, 224, 0.1) 0%, transparent 60%);
    z-index: -1;
}

/* ===== 휘날리는 벚꽃 (z-index: 1) ===== */
.falling-petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, #ffb6c1 0%, #ffc0cb 50%, #ffb6c1 100%);
    border-radius: 50% 0 50% 0;
    opacity: 0.6;
    animation: fall linear infinite;
}

/* 각 벚꽃의 위치와 애니메이션 시간을 다르게 설정 */
.petal:nth-child(1) {
    left: 10%;
    animation-duration: 8s;
    animation-delay: 0s;
}

.petal:nth-child(2) {
    left: 25%;
    animation-duration: 10s;
    animation-delay: 1s;
}

.petal:nth-child(3) {
    left: 40%;
    animation-duration: 12s;
    animation-delay: 2s;
}

.petal:nth-child(4) {
    left: 55%;
    animation-duration: 9s;
    animation-delay: 3s;
}

.petal:nth-child(5) {
    left: 70%;
    animation-duration: 11s;
    animation-delay: 4s;
}

.petal:nth-child(6) {
    left: 85%;
    animation-duration: 10s;
    animation-delay: 5s;
}

.petal:nth-child(7) {
    left: 20%;
    animation-duration: 13s;
    animation-delay: 2.5s;
}

.petal:nth-child(8) {
    left: 60%;
    animation-duration: 9.5s;
    animation-delay: 1.5s;
}

.petal:nth-child(9) {
    left: 33%;
    animation-duration: 11.5s;
    animation-delay: 0.5s;
}

.petal:nth-child(10) {
    left: 75%;
    animation-duration: 10.5s;
    animation-delay: 3.5s;
}

.petal:nth-child(11) {
    left: 5%;
    animation-duration: 12.5s;
    animation-delay: 1.8s;
}

.petal:nth-child(12) {
    left: 90%;
    animation-duration: 9.8s;
    animation-delay: 4.2s;
}

.petal:nth-child(13) {
    left: 45%;
    animation-duration: 10.8s;
    animation-delay: 2.2s;
}

.petal:nth-child(14) {
    left: 18%;
    animation-duration: 11.2s;
    animation-delay: 3.8s;
}

.petal:nth-child(15) {
    left: 65%;
    animation-duration: 13s;
    animation-delay: 0.8s;
}

.petal:nth-child(16) {
    left: 12%;
    animation-duration: 10.2s;
    animation-delay: 2.8s;
}

.petal:nth-child(17) {
    left: 48%;
    animation-duration: 11.8s;
    animation-delay: 1.2s;
}

.petal:nth-child(18) {
    left: 78%;
    animation-duration: 9.2s;
    animation-delay: 4.5s;
}

.petal:nth-child(19) {
    left: 30%;
    animation-duration: 12.2s;
    animation-delay: 3.2s;
}

.petal:nth-child(20) {
    left: 92%;
    animation-duration: 10.8s;
    animation-delay: 0.3s;
}

@keyframes fall {
    0% {
        top: -10%;
        transform: translateX(0) rotate(0deg);
    }

    25% {
        transform: translateX(20px) rotate(90deg);
    }

    50% {
        transform: translateX(-20px) rotate(180deg);
    }

    75% {
        transform: translateX(20px) rotate(270deg);
    }

    100% {
        top: 110%;
        transform: translateX(0) rotate(360deg);
    }
}

/* ===== Navigation Bar (z-index: 100) ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ffe4f0;
    box-shadow: 0 2px 15px rgba(255, 105, 180, 0.1);
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff69b4;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: #4a4a4a;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
    padding: 5px 10px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ff69b4;
}

/* ===== 메인 컨테이너 (z-index: 2) ===== */
.recommand_page {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    max-width: 1000px;
    width: 100%;
    border: 2px solid #ffe4f0;
    border-radius: 20px;
    padding: 50px 40px;
    margin: 0;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.15);
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 타이틀 ===== */
.main_title {
    font-size: 3rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 40px;
    color: #ff69b4;
    text-align: center;
    letter-spacing: 0.05em;
}

/* ===== 아티스트 섹션 ===== */
.artist_section {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0px;
    margin-bottom: 50px;
}

/* 아티스트 사진 크기 */
.artist_photo {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 15px;
    border: 3px solid #ffe4f0;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.2);
    transition: transform 0.3s ease;
}

.artist_photo:hover {
    transform: scale(1.02);
    border-color: #ffb6c1;
}

.artist_photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 아티스트 소개 */
.artist_info {
    flex-grow: 1;
}

.artist_info p {
    margin: 0;
    color: #4a4a4a;
    line-height: 1.8;
}

.info_text {
    margin-bottom: 10px;
}

.member_list {
    margin-top: 10px;
    padding-left: 20px;
}

.member_list li {
    width: 200%;
    max-width: 500px;
    margin-bottom: 8px;
    color: #4a4a4a;
    line-height: 1.6;
}

/* ===== 곡 섹션 ===== */
.songs_section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 40px;
    column-gap: 30px;
    row-gap: 40px;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    width: 100%;
}

.song_item {
    width: auto;
    height: auto;
    align-items: flex-start;
    flex-shrink: 0;
    overflow: visible;
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #ffe4f0;
    border-radius: 12px;
}


.song_photo {
    width: 100px;
    height: 100px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 50%;
    border: 3px solid #ffe4f0;
    box-shadow: 0 3px 10px rgba(255, 105, 180, 0.1);
    transition: transform 0.3s ease;
}

.song_photo:hover {
    transform: scale(1.05);
    border-color: #ff69b4;
}

.song_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.song_info {
    flex-grow: 1;
}

.song_info p {
    margin: 0;
    color: #4a4a4a;
    line-height: 1.6;
    font-size: 0.95rem;
}

.song_info b {
    color: #ff69b4;
    font-size: 1.1rem;
    font-weight: 700;
}

.song-title-link {
    color: #ff69b4;
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.song-title-link:hover {
    color: #ff1493;
    border-bottom: 2px solid #ff69b4;
}

/* ===== 다른 아티스트 섹션 ===== */
.other-artists-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #ffe4f0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ff69b4;
    text-align: center;
    margin-bottom: 30px;
}

.other-artists-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.other-artist-card {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid #ffe4f0;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.other-artist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.25);
    border-color: #ff69b4;
    background: rgba(255, 255, 255, 0.9);
}

.other-artist-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffe4f0;
    transition: all 0.3s ease;
}



.other-artist-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff69b4;
    text-align: center;
}


/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    body {
        padding: 140px 15px 30px;
    }

    .recommand_page {
        padding: 40px 25px;
    }

    .main_title {
        font-size: 2.5rem;
    }

    .artist_section {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 40px;
    }

    .artist_photo {
        width: 100%;
        max-width: 400px;
        height: 250px;
    }

    .songs_section {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .other-artists-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .member_list li {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main_title {
        font-size: 2rem;
    }

    .recommand_page {
        padding: 30px 20px;
    }

    .song_item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .song_photo {
        width: 120px;
        height: 120px;
    }
}

/* ===== 아티스트 정보 섹션 (데이터베이스 연동) ===== */
.artist_detail_table {
    margin: 40px auto 50px;
    max-width: 650px;
    width: 100%;
}

.section-title-small {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff69b4;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
}

/* 기본 정보 테이블 스타일 - 핑크 테마 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255, 240, 245, 0.95) 0%, rgba(255, 228, 240, 0.95) 100%);
    border: 2px solid #ffb6c1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(255, 105, 180, 0.25);
}

.info-table th,
.info-table td {
    padding: 14px 20px;
    text-align: left;
    color: #4a4a4a;
    border-bottom: 1px solid rgba(255, 182, 193, 0.6);
}

.info-table th {
    width: 30%;
    background: linear-gradient(135deg, #ff69b4 0%, #ff85c0 100%);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.info-table td {
    background-color: rgba(255, 255, 255, 0.7);
}

.info-table tr:hover td {
    background-color: rgba(255, 182, 193, 0.3);
    transition: background-color 0.3s ease;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

/* DB 연결 오류 메시지 스타일 - 핑크 테마 */
.db-error-msg {
    color: #c71585;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4f0 100%);
    padding: 15px;
    margin: 20px auto;
    max-width: 800px;
    border: 2px solid #ff69b4;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 3px 15px rgba(255, 105, 180, 0.2);
}

/* ===== 앨범 회전 애니메이션 ===== */
.song_photo.spinning img {
    animation: spin 12s linear infinite;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.8);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}